<template>
  <div class='container-title' @click="toRouter()">
    <div class="flex">
      <p class="name">{{ name }}</p>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      name: {
        type: String
      },
      routerName: {
        type: String
      },
      moreText: {
        type: String
      },
      arrow: {
        type: Boolean,
        default: true
      }
    },
    data() {
      return {

      }
    },
    components: {},
    created() {},
    methods: {
      // type your function
      toRouter() {
        if (this.routerName) {
          this.$router.push({
            name: this.routerName
          })
        }

      }
    },

  }
</script>

<style scoped lang="less">
  .container-title {
    .flex {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 2px solid #F1F1F1;
      

      p.name {
        padding-left: 26px;
        position: relative;
        font-size: 28px;
        color: #2B2E30;
        font-weight: 500;

        &::before {
          content: '';
          position: absolute;
          left: 0;
          top: 0;
          width: 6px;
          height: 20px;
          background: #3975C6;
          border-radius: 4px;
          top: 50%;
          transform: translateY(-50%);
        }
      }

      div {
        display: flex;
        align-items: center;

        span {
          margin-right: 10px;
          color: #7F8389;
          font-size: 26px;
          font-weight: 400;
        }
      }

      img {
        width: 28px;
        height: 28px;
      }
    }
  }
</style>